#!/usr/bin/python
from gmpy2 import *

n = 40795360971651974271650711440993964050307855147720011233981545415438122680764985969049700071051749071781096004576107493076004911609956646026586641164708122628888234552831947705825820830717771374968853614494573673171451401812260688186915972782495102601063537646203830376891448685264916094254020958827455069

c = 38267717521783805358997028434192574072066206734150058806702039241540545591327160817138103308778806260550691278229033409184518095836671759886018797380100194106653804590171378094033599430892604979401307896519429546854583917860199582081050782350831478073093769585362279610973195866544327315887867433642490547

e = 65537

primes = [
	2408536589,
	2613433873,
	2646493621,
	2666585221,
	2670389531,
	2683499473,
	2685364093,
	2741484497,
	2863351783,
	2886722177,
	2925436511,
	3064431973,
	3108375629,
	3148348271,
	3266962103,
	3274199927,
	3340290809,
	3347444599,
	3358514681,
	3521655793,
	3548118169,
	3874420523,
	3896780983,
	3957297011,
	3993894323,
	4051778999,
	4079155009,
	4079785417,
	4111436137,
	4137823787,
	4173914051,
	4186089221
]

totient = 1

for i in primes:
	totient *= (i - 1)

assert gcd(e, totient) == 1

d = invert(e, totient)

get_context().precision=1000

m = powmod(c, d, n)

print str(hex(int(m)))[2:-1].decode('hex')
